<title>执行规则</title>

<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>安全维护</cite></a>
        <a><cite>非正常模式</cite></a>
        <a><cite>清空站点数据</cite></a>
    </div>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">清空站点数据</div>
                <div class="layui-card-body" pad15>
                    <form class="layui-form" wid100 lay-filter="LAY-info-form">
                        <div class="layui-fields">
                        </div>
                        <div class="layui-submit">
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="submit">确认执行</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var config;
    layui.admin.req({
        url: '/manage/data/response.json',
        method: 'POST',
        data: {site: 'select'},
        success: function (res) {
            config = {
                submit: function (obj) {
                    layui.layer.open({
                        type: 2,
                        title: '执行脚本',
                        shadeClose: false,
                        shade: false,
                        maxmin: true,
                        area: ['893px', '600px'],
                        content: '/manage/system/tool/siteclear.html?siteid=' + obj.field.siteid +'&isdel=' + obj.field.isdel + '&access_token=' + encodeURIComponent(layui.data('layuiAdmin').access_token)
                    });
                    return false;
                },
                fields: [
                    {name: '所属站点', key: 'siteid', type: 'select', extra: res.data.site.select, require: true},
                    {name: '删除站点', key: 'isdel', type: 'switch', intro: '清空信息后是否删除站点', extra: '是|否',  value: "1"},
                ]
            };
            layui.use('curd/addOrEdit', layui.factory('curd/addOrEdit'));
        }
    });
</script>
